﻿@{
    ViewBag.Title = "权限管理";
    IEnumerable<InfoSystem> infoSystems = ((IEnumerable<InfoSystem>)ViewBag.InfoSystems).OrderBy(x => x.Number);
    IDictionary<int, string> applicationTypeDescriptions = ViewBag.ApplicationTypeDescriptions;
}

@section header{
    <link type="text/css" href="~/css/Common/Grid.css" rel="stylesheet" />
    <script type="text/javascript" src="~/scripts/Authority/Index.js"></script>
}

<div class="main">
    @*工具栏*@
    <div id="toolbar" class="datagrid-toolbar" style="padding: 5px; height: auto">
        @*按钮区*@
        <div style="margin-bottom: 5px">
            <a href="#" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="createAuthority();">新增</a>
            <a href="#" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="removeAuthorities();">删除</a>
        </div>
        @*表单区*@
        <div style="margin-left: 5px">
            <form id="frmQueries">
                关键字：
                <input class="easyui-textbox" type="text" id="txtKeywords" name="keywords" style="width: 210px" data-options="prompt:'名称/路径/描述'" />
                信息系统：
                <select class="easyui-combobox" id="cbxInfoSystem" name="infoSystemNo" data-options="editable:false" style="width: 210px">
                    <option value="" selected="selected">全部</option>
                    @foreach (InfoSystem infoSystem in infoSystems)
                    {
                        <option value="@infoSystem.Number">@infoSystem.Name</option>
                    }
                </select>
                应用程序类型：
                <select class="easyui-combobox" id="slApplicationType" name="applicationType" data-options="editable:false" style="width: 210px">
                    <option value="" selected="selected">全部</option>
                    @foreach (KeyValuePair<int, string> kv in applicationTypeDescriptions)
                    {
                        <option value="@kv.Key">@kv.Value</option>
                    }
                </select>
                <a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick="searchAuthorities();">搜索</a>
            </form>
        </div>
    </div>
    @*列表*@
    <div id="dvGrid" class="gridDiv">
        <table id="tbGrid"></table>
    </div>
</div>
